Imports Microsoft.VisualBasic

Namespace My
    Public Class MyGridViewRow
        Inherits GridViewRow

        Public Sub New(ByVal rowIndex As Integer, ByVal dataItemIndex As Integer, ByVal rowType As DataControlRowType, ByVal rowState As DataControlRowState)
            MyBase.New(rowIndex, dataItemIndex, rowType, rowState)
        End Sub

        Public Function Eval(ByVal expression As String) As Object
            Return DataBinder.Eval(Me.DataItem, expression)
        End Function

        Public Function FindDDLControl(ByVal id As String) As DropDownList
            Return TryCast(Me.FindControl(id), DropDownList)
        End Function

        Public Function FindTxtControl(ByVal id As String) As TextBox
            Return TryCast(Me.FindControl(id), TextBox)
        End Function

        Public Function FindChkControl(ByVal id As String) As CheckBox
            Return TryCast(Me.FindControl(id), CheckBox)
        End Function

        Public Function FindCalendarTxtControl(ByVal id As String) As MyCalendarTextBoxBase
            Return TryCast(Me.FindControl(id), MyCalendarTextBoxBase)
        End Function

        Public Function FindMVControl(ByVal id As String) As MultiView
            Return TryCast(Me.FindControl(id), MultiView)
        End Function

        Public Function FindvwControl(ByVal id As String) As View
            Return TryCast(Me.FindControl(id), View)
        End Function

    End Class
End Namespace
